<?php

/*
 * Author: Quan Van Sinh
 * Email: qvsinh@yahoo.com
 */

/*
  $start = microtime ();
  $start = explode ( " ", $start );
  $start = $start [1] + $start [0];
 */


session_start();
error_reporting(E_ALL);
error_reporting(1);

include "init.php";

ob_start("clean_html_output");

$mid = intval($_GET['mid']);
$aid = intval($_GET['aid']);
$key = trim($_GET['key']);


$memberInfo = $member->getById($mid);

if(!$mid || $key != md5($memberInfo['create_date'])){
    header("Location:".DOMAIN);
}

include_once MODEL_DIR . 'share.class.php';
$share = new share();

$rsAlbum = $share->listMyAlbum();
while ($row = $db->fetch_array($rsAlbum['rs'])) {
    $arrAlbum[$row['id']] = $row;
    $arrImages = $share->listMyImage($mid,$row['id']);
    $arrAlbum[$row['id']]['arrImages'] = $arrImages;
}

//print_r($arrAlbum);


include "apps/PolaroidPhotobarGallery2/bar.php";

?>